<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:p="http://primefaces.org/ui"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets">


    <ui:composition template="../../resources/template/indexTemplate.xhtml">

        <ui:define name="ẗitle">-= Associacao - Lista de Usuários =-</ui:define>

        <ui:define name="content">

            <p:panel rendered="#{userMB.admin}"
                     tyleClass="content" style="background:none;">

                <!-- 			<p:panel rendered="{userMB.admin}" -->
                <!-- 			header="Cadastro de Associado {associadoMB.atualizaListaAssociadosTable()}" -->
                <!-- 			styleClass="content" style="background:none;"> -->

                <h:form id="formAssociadoCad">
                    <p:growl id="messages" />
                    <h:panelGrid columns="2">

                        <h:outputLabel for="nome" value="Nome: " />
                        <h:outputText id="nome"
                                      value="#{associadoMB.associadoTemp.nome}" >
                        </h:outputText>

                        <h:outputLabel for="nascimento" value="Data de Nascimento: " />
                        <h:outputText id="nascimento"
                                      value="#{associadoMB.associadoTemp.nascimento}" >
                        </h:outputText>


                        <h:outputLabel for="sexo" value="Sexo: " />  
                        <h:outputText id="sexo" 
                                      value="#{associadoMB.associadoTemp.sexo}" >  
                        </h:outputText>



                        <h:outputLabel for="rg" value="RG: " />
                        <h:outputText id="rg"
                                      value="#{associadoMB.associadoTemp.rg}">
                        </h:outputText>


                        <h:outputLabel for="uf_rg" value="UF do Rg: " />  
                        <h:outputText id="uf_rg" 
                                      value="#{associadoMB.associadoTemp.ufRg}" >  
                        </h:outputText>

                        <h:outputLabel for="cpf" value="CPF: " />
                        <h:outputText id="cpf"
                                      value="#{associadoMB.associadoTemp.cpf}">
                        </h:outputText>

                        <h:outputLabel for="passaporte" value="Número do Passaporte: " />
                        <h:outputText id="passaporte"
                                      value="#{associadoMB.associadoTemp.passaporte}"/>


                        <h:outputLabel for="email" value="E-Mail: " />
                        <h:outputText id="email"
                                      value="#{associadoMB.associadoTemp.email}" />
                        
                        
                    </h:panelGrid>
                    
                    <p:dataTable  id="tabelaTelefone" widgetVar="tabela" var="tda" 
                                  value="#{associadoMB.associadoTemp.telefoneDoAssociados}" 
                                  emptyMessage="Não há telefones cadastrados." 
                                  style="width: 500px"
                                  rowIndexVar="rowIndex"
                                  >
                     

                        <p:column 
                            headerText="Telefone"
                                                        >
                            <h:outputText value="#{tda.telefone.telefone}" />          
                        </p:column>

                        <p:column 
                            headerText="Tipo" 
                            >
                            <h:outputText value="#{tda.telefone.tipoTelefone.tipo}"  />          
                        </p:column>

                        
                    </p:dataTable>

                    <!--                    <h:panelGrid columns="2">
                                            <p:commandButton id="botaoSalvar" type="submit" value="Salvar"
                                                             action="{associadoMB.createAssociado}" ajax="false" />
                                            <p:commandButton id="botaoCancelar" type="submit" value="Cancelar"
                                                             ajax="false" immediate="true"
                                                             action="{associadoMB.resetAssociado}" />
                                        </h:panelGrid>-->


                </h:form>
            </p:panel>
        </ui:define>
    </ui:composition>
</html>

